package T01_test_all.test12stringAmount;

import java.util.Scanner;

public class T12 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int maxCount = 0;
        int minCout = 0;
        int numberCount = 0;

        for (int i = 0; i < str.length(); i++) {
            char cha = str.charAt(i);
//            System.out.println(cha);
            if(cha >= 'a' && cha <= 'z'){
                minCout++;
            }else if( cha >= 'A' && cha <= 'Z'){
                maxCount++;
            }else if(cha >= '0' && cha <= '9'){
                numberCount++;
            }
        }
        System.out.println( minCout );
        System.out.println( maxCount );
        System.out.println( numberCount );

    }
}
